package com.milkshopbackend.milkshop.entity;

import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;

@Data
public class CartDTO {
    @NotNull(message = "商品ID不能为空")
    private Long productId;



    @NotNull(message = "商品数量不能为空")
    @Min(value = 1, message = "商品数量必须大于0")
    private Integer quantity;

    //设置默认为中杯
    @NotNull(message = "商品规格不能为空")
    private String specType = "medium"; // large 或 medium

    public String getSpecType() {
        return specType;
    }

    public void setSpecType(String specType) {
        this.specType = specType;
    }
}